#include <string>
#include <vector>
#include <ctime>
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <iterator>

#include "solution_checker.h"

using roadef_challenge::DataParser;
using roadef_challenge::SolutionChecker;
using namespace std;

class roadef {
 
  private:
    int vrand;
    int vMax;           // nombre de meme resultat ou resultat inferieur avant degradation
    int NBChamgementMax;    // nombre de permutation degradante
    double temp;     // temps en seconde
    int sizeLTabou;
    int NBmachine;
    vector<int> model;
    vector<int> best_ass;
    int64 best_score;
    vector<int> initial_assignments;
    vector<int> assignments_changement;
    vector<int> solution;
    SolutionChecker *check;
    
    DataParser *data;
    int64 GoodChangement(int nb);
    bool meilleur(int res);
    int64 GetNouvelleObjectif(vector<int>& end) ;
    void FileToVector(const char* const filename, vector<int>& values);
  public:
    roadef(string mod,string init, int vmax, int rand, int pmax,int time);
    void initV();
    void algo();
    void printRes();
    void saveFile(string name);
};
